package com.example.znbk.znbklibrary.widget;

import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;

//查看ImageGetter接口
//public static interface ImageGetter {
//    public Drawable getDrawable(String source);
//}
//实现DrawableWrapper
class MyDrawableWrapper extends BitmapDrawable {
    private Drawable drawable;

    MyDrawableWrapper() {

    }

    @Override
    public void draw(Canvas canvas) {
        if (drawable != null)
            drawable.draw(canvas);
    }

    public Drawable getDrawable() {
        return drawable;
    }
    public void setDrawable(Drawable drawable) {
        this.drawable = drawable;
    }
}